<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@include file="/context/mytags.jsp"%>
<t:base type="jquery,easyui,tools,DatePicker"></t:base>
<div class="easyui-layout" fit="true">
  <div region="center" style="padding:0px;border:0px">
  <t:datagrid name="dictGroupList" checkbox="false" fitColumns="true" title="耗材库存列表" actionUrl="consumeMeterialStockOutController.do?datagrid" idField="id" fit="true" queryMode="group">
   <t:dgCol title="主键"  field="id"  hidden="true"  queryMode="single"  width="120"></t:dgCol>
   <t:dgCol title="耗材名称"  field="meterial.name"  query="true" queryMode="single"  width="100"></t:dgCol>
   <t:dgCol title="编号"  field="meterial.num"   query="false" queryMode="single"  width="100"></t:dgCol>
   <t:dgCol title="库存数量"  field="balance"   queryMode="single"  width="120"></t:dgCol>
   <t:dgCol title="单位"  field="meterial.unit"   queryMode="single"  width="120"></t:dgCol> 
   <t:dgCol title="实验室"  field="lab_name"  query="true"   queryMode="single"  width="120"></t:dgCol> 
   <t:dgCol title="操作" field="opt" width="140"></t:dgCol>
   <t:dgFunOpt funname="createApply(id)" title="申请耗材" exp="applyState_value#ne#0"></t:dgFunOpt>  <!-- 库存数量不等于0是才显示申请按钮 -->
     
   </t:datagrid>
  </div>
 </div>

 <div region="east" style="width: 500px;" split="true">
	<div  class="easyui-panel" title='我的出库申请' noheader="true"  href="consumeMeterialStockOutController.do?applyList" 
		style="padding: 0px;" fit="true" border="false" id="function-panel"></div>
  </div>
  <script type="text/javascript">
 
 
 function createApply(id){
	 
	 $.dialog({
			content: 'url:'+'consumeMeterialStockOutController.do?goAdd&id='+id,
			zIndex: getzIndex(),
			width:400,
			height: 300,
			lock:true,
			title:'申请',
			opacity : 0.3,
			ok:function(){
				iframe = this.iframe.contentWindow;
				$('#btn_sub', iframe.document).click();
				$('#function-panel').panel('open').panel('refresh');
				return false;
			},
			cache:false, 
		    cancelVal: '关闭',
		    cancel: true /*为true等价于function(){}*/
		}); 
	}
 
 </script>